package com.aolong.archives.core.sysmanage.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.rock.platform.action.BaseAction;

public class LogoffAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	public String logoff()
	{
		destroySession();
		
		return SUCCESS;
	}

	private void destroySession()
	{
		HttpServletRequest request = ServletActionContext.getRequest();
	    HttpSession session = request.getSession();
	    session.invalidate();
	}
	
}
